﻿<?php
	include 'conexao.php';
	session_start();
	
	$email  = $_REQUEST['email'];
	$senha  = $_REQUEST['senha'];
	
	$update = "UPDATE usuario SET email='".$email."' WHERE senha='".$senha."' AND id=".$_SESSION['valida'].";";
	
	if(mysql_query($update)){
		header ("location:../chat.php");
		$_SESSION['update'] = '1';
	}else{
		header ("location:../chat.php");
		$_SESSION['update'] = '2';
	}
?>